package com.googlecode.jtoy.patterns.observer;

/**
 * @author shangxj
 * @date 6:45:17 PM, Jul 16, 2011
 */
public class MockTimeSource extends Subject implements TimeSource {

	private int hours;
	private int minutes;
	private int seconds;

	public void setTime(int hours, int minutes, int seconds) {
		this.hours = hours;
		this.minutes = minutes;
		this.seconds = seconds;
		this.notifyObservers();
	}

	@Override
	public int getHours() {
		return this.hours;
	}

	@Override
	public int getMinutes() {
		return this.minutes;
	}

	@Override
	public int getSeconds() {
		return this.seconds;
	}

}
